﻿var minW = 1000;

$(function () {
    CheckSizeZoom();
    $('#divWrap').css('visibility', 'visible');
});
$(window).resize(CheckSizeZoom);

function CheckSizeZoom() {
    if ($(window).width() < minW) {
        var zoomLev = $(window).width() / minW;

        if (typeof (document.body.style.zoom) != "undefined") {
            $(document.body).css('zoom', zoomLev);
        }
        else {
            // Mozilla doesn't support zoom, use -moz-transform to scale and compensate for lost width
            $('#divWrap').css({
                "-moz-transform": 'scale(" + zoomLev + ")',
                width: $(window).width() / zoomLev + 10,
                position: 'relative',
                left: (($(window).width() - minW - 16) / 2) + "px",
                top: "-19px"
            });
        }
    }
    else {
        $(document.body).css({
            zoom: '',
            position: '',
            left: "",
            top: "",
            "-moz-transform": "",
            width: ''
        });
    }
}